All Questions
Tagged with functional-programmingc
12 questions
2votes
1answer
201views
Commented Parser Combinators in Lisp-style C
I've attempted to remedy the issues outlined in the answer to my previous question. I've added several hundred blank lines to better illustrate the grouping of functions and generally make things look ...
2votes
1answer
156views
Parser Combinators in C redux
A few more rewrites down the line from my previous question, this is the C version 11 based on the PostScript prototype version 12. The PostScript version is shorter, but it's some crazy ass ...
2votes
3answers
163views
Finds Keywords in Log Files
This is my first project in C and I wanted a more experienced person's insight on how I made the whole program. Just looking for feedback it works how I want it to. The Github is here. Thank you so ...
4votes
3answers
2kviews
Split function using C and dynamic memory allocation
I have programmed a function to split strings, and it gives the expected output. I am looking forward to write better code and I was told here is a good place to start. Here's my program: ...
1vote
2answers
120views
A function to scan user input as string
I know that multiple functions are already available. However, I thought of writing my own because I wanted to learn the logic (and also because I thought there wasn't enough confusion :P). Please ...
-1votes
1answer
360views
Interlock of some equipments in electrical power system using simple Arduino Uno code [closed]
I'm trying to implement some logic functions essential to control a small power system consisting of 2 Transformers labeled T1 and T2, 2 Generators (G1 and G2) and a bus tie (BT). I'm not going to ...
4votes
2answers
91views
User defined function call on a stack based interpreter for concatenative language
I would like to receive some advice on how to improve a small concatenative stack-based interpreter, executing a joy-like programming language. It is really minimal, and is in fact a subset of a ...
10votes
1answer
528views
Lazy, Functional Parser Combinators
Parser Combinators are the amazingly elegant way to write parsers that has evolved over on the functional programming side of the world, but have been less available or accessible for imperative ...
2votes
1answer
314views
Parser Combinators in OO C
In trying to understand and use the Parser Combinator concept, I've coded up as close an analogue as I could manage within the constraints of the C language. C doesn't have first-class functions or ...
1vote
1answer
129views
Prime factorization - C
After learning prime factorization today, below is the C code written, ...
8votes
2answers
321views
Compiler for a minimal LISP dialect to run on the Java Virtual Machine
As the title states, this is a compiler written in C with a ruby build script that translates a minimal LISP dialect and spits out an executable jar file. I designed this LISP dialect and named it ...
3votes
2answers
173views
Functional-style linked list written in C
For my Operating Systems class, I needed a linked list data structure and didn't have one already written. During the course of thinking about how to implement a linked list again (it had been a while....